Cocktail Help Reference
NavigateToAsync Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > NavigationService<T> Class : NavigateToAsync Method



target
A function to determine the navigation target.
prepareTarget
An optional function to prepare the navigation target before it gets activated.
prepareTargetAsync
An optional function to asynchronously prepare the navigation target before it gets activated.

Glossary Item Box

Asynchronously navigates to the specified target view model.

Syntax

Visual Basic (Declaration) 
Public Function NavigateToAsync( _
   ByVal target As Func(Of T), _
   Optional ByVal prepareTarget As Action(Of T), _
   Optional ByVal prepareTargetAsync As Func(Of T,IResult) _
) As NavigateResult(Of T)
Visual Basic (Usage)Copy Code
Dim instance As NavigationService(Of T)
Dim target As Func(Of T)
Dim prepareTarget As Action(Of T)
Dim prepareTargetAsync As Func(Of T,IResult)
Dim value As NavigateResult(Of T)
 
value = instance.NavigateToAsync(target, prepareTarget, prepareTargetAsync)
C++/CLI 
public:
NavigateResult<T^>^ NavigateToAsync( 
   Func<T^>^ target,
   Action<T^>^ prepareTarget,
   Func<T^,IResult^>^ prepareTargetAsync
) 

Parameters

target
A function to determine the navigation target.
prepareTarget
An optional function to prepare the navigation target before it gets activated.
prepareTargetAsync
An optional function to asynchronously prepare the navigation target before it gets activated.

Return Value

An object representing the asynchronous navigation operation.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.